package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbWeightTimeoutMapper;
import com.ruoyi.system.domain.TbWeightTimeout;
import com.ruoyi.system.service.ITbWeightTimeoutService;

/**
 * 过磅超时Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-07
 */
@Service
public class TbWeightTimeoutServiceImpl implements ITbWeightTimeoutService 
{
    @Autowired
    private TbWeightTimeoutMapper tbWeightTimeoutMapper;

    /**
     * 查询过磅超时
     * 
     * @param id 过磅超时主键
     * @return 过磅超时
     */
    @Override
    public TbWeightTimeout selectTbWeightTimeoutById(Long id)
    {
        return tbWeightTimeoutMapper.selectTbWeightTimeoutById(id);
    }

    /**
     * 查询过磅超时列表
     * 
     * @param tbWeightTimeout 过磅超时
     * @return 过磅超时
     */
    @Override
    public List<TbWeightTimeout> selectTbWeightTimeoutList(TbWeightTimeout tbWeightTimeout)
    {
        return tbWeightTimeoutMapper.selectTbWeightTimeoutList(tbWeightTimeout);
    }

    /**
     * 新增过磅超时
     * 
     * @param tbWeightTimeout 过磅超时
     * @return 结果
     */
    @Override
    public int insertTbWeightTimeout(TbWeightTimeout tbWeightTimeout)
    {
        tbWeightTimeout.setCreateTime(DateUtils.getNowDate());
        return tbWeightTimeoutMapper.insertTbWeightTimeout(tbWeightTimeout);
    }

    /**
     * 修改过磅超时
     * 
     * @param tbWeightTimeout 过磅超时
     * @return 结果
     */
    @Override
    public int updateTbWeightTimeout(TbWeightTimeout tbWeightTimeout)
    {
        tbWeightTimeout.setUpdateTime(DateUtils.getNowDate());
        return tbWeightTimeoutMapper.updateTbWeightTimeout(tbWeightTimeout);
    }

    /**
     * 批量删除过磅超时
     * 
     * @param ids 需要删除的过磅超时主键
     * @return 结果
     */
    @Override
    public int deleteTbWeightTimeoutByIds(Long[] ids)
    {
        return tbWeightTimeoutMapper.deleteTbWeightTimeoutByIds(ids);
    }

    /**
     * 删除过磅超时信息
     * 
     * @param id 过磅超时主键
     * @return 结果
     */
    @Override
    public int deleteTbWeightTimeoutById(Long id)
    {
        return tbWeightTimeoutMapper.deleteTbWeightTimeoutById(id);
    }
}
